package com.stylefeng.guns.api.pay;

import com.stylefeng.guns.api.pay.vo.AlipayInfoVo;
import com.stylefeng.guns.api.pay.vo.AlipayResultVo;
import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName AlipayServiceApiMock
 * @Description TODO
 * @Author zhaoluowei
 * @Date 2019/9/22  21:55
 * @Version 1.0
 */
//mock 做服务降级用
@Slf4j
public class AlipayServiceApiMock implements AlipayServiceApi {
    @Override
    public AlipayInfoVo getORCode(String orderId) {
        return null;
    }

    @Override
    public AlipayResultVo getOrderPayStatus(String orderId) {
        log.info(" 阿里云支付 mock 接口 --> " + orderId);
        AlipayResultVo alipayResultVo = new AlipayResultVo();
        alipayResultVo
                .setOrderId(orderId)
                .setOrderStatus(0)
                .setOrderMsg("阿里云支付 mock 接口 --> 尚未支付成功");

        return alipayResultVo;
    }
}
